package com.qyer.lxp.model.book.parameter;

import com.qyer.lxp.common.framework.adapter.DateAdapter;
import com.qyer.lxp.model.availability.parameter.BookedSpecification;

import javax.xml.bind.annotation.*;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * Created by jiangping on 16/7/1.
 */
@XmlRootElement(name = "leader")
@XmlAccessorType(XmlAccessType.FIELD)
public class BookPersonInformation implements Serializable{
    private static final long serialVersionUID = 397374484799050006L;

    /**
     * 领队人的联系电话
     */
    private String phone;

    /**
     * ADT/CHD/IFT(成人/儿童/婴儿)
     */
    @XmlElement(name = "crowd-type")
    private String crowdType;

    /**
     * 名
     */
    private String firstname;

    /**
     * 姓
     */
    private String surname;

    /**
     * 性别 MALE/FEMALE
     */
    private String gender;

    /**
     * 国籍(中文名)
     */
    @XmlElement(name = "nationality-code")
    private String nationalityCode;

    /**
     * 出生年月日(1999-09-09)
     */
    @XmlJavaTypeAdapter(value = DateAdapter.class)
    private Date birth;

    /**
     * 证件类型(从预订限制接口获取证件类型列表)
     */
    @XmlElement(name = "identity-type")
    private String identityType;

    /**
     * 证件号码
     */
    @XmlElement(name = "identity-num")
    private String identityNum;

    /**
     * 证件有效时间
     */
    @XmlElement(name = "identity-expire-date")
    @XmlJavaTypeAdapter(value = DateAdapter.class)
    private Date identityExpireDate;

    /**
     * 所属的规格(成人/儿童/青年)
     */
    @XmlElementWrapper(name = "specifications")
    private List<BookedSpecification> specification;

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getCrowdType() {
        return crowdType;
    }

    public void setCrowdType(String crowdType) {
        this.crowdType = crowdType;
    }

    public String getFirstname() {
        return firstname;
    }

    public void setFirstname(String firstname) {
        this.firstname = firstname;
    }

    public String getSurname() {
        return surname;
    }

    public void setSurname(String surname) {
        this.surname = surname;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getNationalityCode() {
        return nationalityCode;
    }

    public void setNationalityCode(String nationalityCode) {
        this.nationalityCode = nationalityCode;
    }

    public Date getBirth() {
        return birth;
    }

    public void setBirth(Date birth) {
        this.birth = birth;
    }

    public String getIdentityType() {
        return identityType;
    }

    public void setIdentityType(String identityType) {
        this.identityType = identityType;
    }

    public String getIdentityNum() {
        return identityNum;
    }

    public void setIdentityNum(String identityNum) {
        this.identityNum = identityNum;
    }

    public Date getIdentityExpireDate() {
        return identityExpireDate;
    }

    public void setIdentityExpireDate(Date identityExpireDate) {
        this.identityExpireDate = identityExpireDate;
    }

    public List<BookedSpecification> getSpecification() {
        return specification;
    }

    public void setSpecification(List<BookedSpecification> specification) {
        this.specification = specification;
    }

    @Override
    public String toString() {
        return "BookPersonInformation{" +
                "phone='" + phone + '\'' +
                ", crowdType='" + crowdType + '\'' +
                ", firstname='" + firstname + '\'' +
                ", surname='" + surname + '\'' +
                ", gender='" + gender + '\'' +
                ", nationalityCode='" + nationalityCode + '\'' +
                ", birth=" + birth +
                ", identityType='" + identityType + '\'' +
                ", identityNum='" + identityNum + '\'' +
                ", identityExpireDate=" + identityExpireDate +
                ", specification=" + specification +
                '}';
    }
}
